<?php
//$client = new swoole_client(SWOOLE_SOCK_TCP);//创建swoole tcp客户端
//$client->connect('127.0.0.1', 9510, 10) or die("连接失败");//连接server
//
//for($i=1;$i<20000;$i++){
//    $sql = "select * from pay_order where id={$i}";
//    $client->send($sql."\r\n\r\n");//发送要执行的sql
//}
//$client->close();//关闭连接


for($i=1;$i<20000;$i++){
    $client = new swoole_client(SWOOLE_SOCK_TCP);//创建swoole tcp客户端
    $client->connect('127.0.0.1', 9510, 10) or die("连接失败");//连接server
    $sql = "select * from pay_order where id={$i}";
    $client->send($sql."\r\n\r\n");//发送要执行的sql
    $client->close();//关闭连接

}